package com.base.service.impl;

import com.base.mapper.voipmapper.MemberOrderMapper;
import com.base.po.voip.MemberOrder;
import com.base.po.voip.MemberOrderExample;
import com.base.service.MemberOrderService;
import com.base.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("MemberOrder")
public class MemberOrderServiceImpl implements MemberOrderService {

    @Autowired
    MemberOrderMapper memberOrderMapper;

    @Override
    public int countByExample(MemberOrderExample example) {
        return memberOrderMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(MemberOrderExample example) {
        return memberOrderMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return memberOrderMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(MemberOrder record) {
        return memberOrderMapper.insert(record);
    }

    @Override
    public int insertSelective(MemberOrder record) {
        return memberOrderMapper.insertSelective(record);
    }

    @Override
    public List<MemberOrder> selectByExample(MemberOrderExample example) {
        return memberOrderMapper.selectByExample(example);
    }

    @Override
    public MemberOrder selectByPrimaryKey(Integer id) {
        return memberOrderMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(MemberOrder record, MemberOrderExample example) {
        return memberOrderMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(MemberOrder record, MemberOrderExample example) {
        return memberOrderMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(MemberOrder record) {
        return memberOrderMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(MemberOrder record) {
        return memberOrderMapper.updateByPrimaryKey(record);
    }

    @Override
    public MemberOrder selectByUserId(String id) {
        return memberOrderMapper.selectByUserId(id);
    }

    @Override
    public MemberOrder selectBuyOutTradeNo(String out_trade_no) {
        return memberOrderMapper.selectBuyOutTradeNo(out_trade_no);
    }

    @Override
    public List<MemberOrder> getALLSuccessOrder(String userid) {
        return memberOrderMapper.getALLSuccessOrder(userid);
    }

    @Override
    public Integer countByAll(String userId, String orderId, String createTime, String status) {
        return memberOrderMapper.countByAll(userId,orderId,createTime, status);
    }

    @Override
    public List<MemberOrder> selectByAll(Page page, String userId, String orderId, String createTime, String status) {
        return memberOrderMapper.selectByAll( page,  userId, orderId, createTime, status) ;
    }
}
